using BarrageGrab;
using BarrageGrab.Entity.Enums;
using BarrageGrab.Entity.Models;
using BarrageGrab.Entity.Models.Douyin;
using MySqlConnector;
using SqlSugar;
using YOUYOU.Core;

namespace 抖音弹幕
{
    internal static class Program
    {
        /// <summary>
        ///  The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            // To customize application configuration such as set high DPI settings or default font,
            // see https://aka.ms/applicationconfiguration.
            ApplicationConfiguration.Initialize();
            //建库
            SqlsugarHelper.db.DbMaintenance.CreateDatabase();//达梦和Oracle不支持建库

            //建表（看文档迁移）
            SqlsugarHelper.db.CodeFirst.InitTables<DouyinMsgGifts>(); //所有库都支持   
            SqlsugarHelper.db.CodeFirst.InitTables<BarrageGrab.Entity.Models.GiftConfig>(); //所有库都支持   
          //  SqlsugarHelper.db.CodeFirst.InitTables<Config>(); //所有库都支持   
            //注册服务
            ServiceRegistrar.BuildServices();

            Application.Run(ApplicationRuntime.MainForm);
        }
    }
}